package com.daxt.model.constant;

/**
 * @description: 文件扩展名
 *
 * @author: lig
 * @date: 2021/7/19
 */
public enum FileExt {

	//图片
	img_jpg("jpg"), //
	img_png("png"), //
	img_tif("tif"), //
	img_tiff("tiff"), //
	img_jpeg("jpeg"), //
	img_gif("gif"), //

	//word
	doc("doc"),
	docx("docx"),

	//excel
	xls("xls"), //
	xlsx("xlsx"), //

	mp3("mp3"), //
	mp4("mp4"), //

	//pdf
	pdf("pdf"); // 状态类型


	private final String desc;

	private FileExt(String desc) {
		this.desc = desc;
	}

	public String getDesc() {
		return desc;
	}

	public static boolean hasKey(String key) {
		FileExt[] values = FileExt.values();
		for (FileExt loginType : values) {
			if (loginType.name().equals(key)) {
				return true;
			}
		}
		return false;
	}
}
